How to send messages to a Custom Message Folder? [EWS managed Api]

Hi there, Emails are usually created in Inbox folder via EWS.. I want to create message in Custom Folder ? how do I achieve this ?  I have the following code to send message. This message is sent to the Inbox folder by default. I want the messages to be sent to the custom Folder I have created. 

 EmailMessage email = new EmailMessage(EWSservice.GetEWSService());
                                    email.Subject = message.Subject;
                                    email.ToRecipients.Add("id");
                                    email.Body = message.TextBody;
                                    email.Body.BodyType = BodyType.Text;
                                    email.Body = message.HTMLBody;
                                    email.Body.BodyType = BodyType.HTML;
email.Send();

March 16th, 2015 2:49pm

Messages will always be delivered to the Inbox folder what you can do with EWS is create an Inbox rule to move the messages to another folder based on a property you set in the Message see https://msdn.microsoft.com/en-us/library/office/ff597937%28v=exchg.80%29.aspx .

Cheers
Glen

  • Marked as answer by SharpDragon 3 hours 1 minutes ago
Free Windows Admin Tool Kit Click here and download it now
March 16th, 2015 11:08pm

Messages will always be delivered to the Inbox folder what you can do with EWS is create an Inbox rule to move the messages to another folder based on a property you set in the Message see https://msdn.microsoft.com/en-us/library/office/ff597937%28v=exchg.80%29.aspx .

Cheers
Glen

  • Marked as answer by SharpDragon Tuesday, March 17, 2015 4:21 AM
March 17th, 2015 3:06am

Wait, do you mean they show up in the Inbox on the recipient's side, or they are getting saved in the Inbox on the sending side?

Free Windows Admin Tool Kit Click here and download it now
March 17th, 2015 12:48pm

I meant they show up in the Inbox on the recipient's side. 
March 24th, 2015 12:18pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics